package com.my.chapter10;

public class practice7 {
    public static void main(String[] args) {
        Outer7 o = new Outer7();
        o.getInner();
    }
}

class Outer7{
    private String content = "A";
    private void update(){
        System.out.println("update()");
    }
    class Inner{
        public void modify(){
            System.out.println("before：content="+content);
            content = "B";
            System.out.println("after：content="+content);
            update();
        }
    }
    void getInner(){
        Inner i = new Inner();
        i.modify();
    }

}
